<template>
	<view class="content" :style="'background: url('+ c_imgPath + 'mine/indexBg.png'+ ') repeat-y 0 0 / 100% auto;'">
		<view class="header">
			<view class="qiehuan">
				<view @click="getlist(v.id)" v-for="(v,i) in arr" :key="i">
					<view :class="show==v.id?'xzs':'wzs'">{{v.text}}</view>
					<view class="qiehuan_line" v-if="show==v.id">
						<image :src="c_imgPath+'mine/text_bom.png'"></image>
					</view>
				</view>
			</view>
		</view>
		<!-- 内容 -->
		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
			<view class="item" v-for="(item,index) in listData" :key="index">
				<view class="item_top">
					<view class="left">整点</view>
					<view class="right">{{item.tal_money}}</view>
				</view>
				<view class="item_center">
					<view class="left">{{item.addtime}}</view>
					<view class="right">
						<text v-if="item.status == 1">已通过</text>
						<text v-if="item.status == 0">审核中</text>
						<text v-if="item.status == 2">已驳回</text>
					</view>
				</view>
				<!-- <view class="item_bom">
					<view class="left">驳回原因：</view>
					<view class="right">收款码上传错误</view>
				</view> -->
			</view>
		</mescroll-body>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				c_imgPath: 'https://qt.yhemall.com/',
				arr: [{
						text: '全部',
						id: 4
					},
					{
						text: '已通过',
						id: 1
					},
					{
						text: '审核中',
						id: 0
					},
					{
						text: '已驳回',
						id: 2
					}
				],
				show: 4,
				downOption: {
					auto: false
				},

				listData: []
			}
		},
		methods: {
			getlist(v) {
				this.show = v;
				this.listData = []
				this.mescroll.resetUpScroll()
			},
			downCallback() {
				this.mescroll.resetUpScroll()
			},
			upCallback(page) {
				this.loadData(page.num);
			},
			loadData(pageNo) {
				let that = this;
				that.req({
					url: 'withdraw_log',
					Loading: true,
					data: {
						page: pageNo,
						status: that.show
					},
					success(res) {
						that.mescroll.endByPage(res.data.list.length, res.data.last_page);
						if (pageNo == 1) {
							that.listData = res.data.list;
						} else {
							that.listData = that.listData.concat(res.data.list);
						}

					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.item {
		width: 690rpx;
		min-height: 82rpx;
		background: linear-gradient(180deg, rgba(45, 44, 74, 0.45) 0%, rgba(72, 73, 91, 0.45) 100%);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		border: 1rpx solid;
		border-image: linear-gradient(180deg, rgba(93.00000205636024, 88.00000235438347, 104.00000140070915, 1), rgba(146.00000649690628, 148.000006377697, 154.00000602006912, 1)) 1 1;
		padding: 20rpx;
		margin: 0 auto 30rpx;

		.item_top {
			display: flex;
			align-items: center;

			.left {
				flex: 1;
				font-size: 28rpx;
				font-weight: 400;
				color: #FFFFFF;
			}

			.right {
				font-size: 32rpx;
				font-weight: 400;
				color: #BC66FF;
			}
		}

		.item_center {
			display: flex;
			align-items: center;
			font-size: 24rpx;
			font-weight: 400;
			margin: 20rpx 0;

			.left {
				flex: 1;
				color: #999999;
			}

			.right {
				color: #FFFFFF;
			}
		}

		.item_bom {
			display: flex;
			align-items: center;

			.left {
				flex: 1;
				font-size: 28rpx;
				font-weight: 400;
				color: #FFFFFF;
			}

			.right {
				width: 300rpx;
				text-align: right;
				font-size: 24rpx;
				font-weight: 400;
				color: #999999;
			}
		}
	}


	.header {
		width: 750rpx;
		/* height: 176rpx; */
		padding-bottom: 30rpx;
		background: #09081C;
		font-size: 28rpx;
		color: #333333;
		box-sizing: border-box;
		position: fixed;
		/* #ifdef MP */
		top: 0;
		/* #endif */
		/* #ifndef MP */
		top: 88rpx;
		/* #endif */
		z-index: 15;

		.qiehuan {
			display: flex;
			justify-content: space-between;
			/* align-items: center; */
			margin-top: 16rpx;
		}

		.qiehuan_line {}

		.qiehuan_line>image {
			width: 94rpx;
			height: 24rpx;
		}

		.qiehuan>view {
			flex: 1;
			text-align: center;
		}

		.wzs {
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #9E99E3;
		}

		.xzs {
			font-size: 32rpx;
			background: linear-gradient(0deg, #B75AFF 0%, #E7CBFF 100%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			font-weight: bold;

		}
	}


	.content {
		width: 100vw;
		min-height: 100vh;
		padding-top: 140rpx;
		background: #09081C;
		box-sizing: border-box;
	}
</style>